CREATE TABLE [dbo].[TDCHEQ_BANC]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_BANC] [dbo].[TD_VC_003] NOT NULL,
[CO_UNID_CONC] [dbo].[TD_VC_003] NOT NULL,
[NU_CNTA_BANC] [dbo].[TD_VC_020] NOT NULL,
[AA_BNCO] [dbo].[TD_VC_004] NOT NULL,
[MM_BNCO] [dbo].[TD_VC_002] NOT NULL,
[TI_MOVI_BANC] [dbo].[TD_VC_001] NOT NULL,
[NU_COMP_BANC] [dbo].[TD_VC_008] NOT NULL,
[NU_SECU] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TDCHEQ_BA__NU_SE__6F1576F7] DEFAULT ((0)),
[TI_ENTI] [dbo].[TD_VC_001] NULL,
[CO_ENTI] [dbo].[TD_VC_020] NULL,
[CO_BANC_CHEQ] [dbo].[TD_VC_003] NULL,
[NU_CHEQ] [dbo].[TD_VC_020] NULL,
[CO_MONE] [dbo].[TD_VC_003] NULL,
[IM_CHEQ] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDCHEQ_BA__IM_CH__70099B30] DEFAULT ((0)),
[IM_CONV] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDCHEQ_BA__IM_CO__70FDBF69] DEFAULT ((0)),
[FE_DISP] [dbo].[TD_DT_001] NULL,
[FE_DIFE] [dbo].[TD_DT_001] NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDCHEQ_BA__CO_US__71F1E3A2] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDCHEQ_BA__FE_US__72E607DB] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDCHEQ_BA__CO_US__73DA2C14] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDCHEQ_BA__FE_US__74CE504D] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDCHEQ_BANC] ADD CONSTRAINT [PK__TDCHEQ_B__FF89FA2612DEA178] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_BANC], [CO_UNID_CONC], [NU_CNTA_BANC], [AA_BNCO], [MM_BNCO], [TI_MOVI_BANC], [NU_COMP_BANC], [NU_SECU]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDCHEQ_BANC] ADD CONSTRAINT [FK__TDCHEQ_BANC__342A86AA] FOREIGN KEY ([CO_EMPR], [CO_BANC], [CO_UNID_CONC], [NU_CNTA_BANC], [AA_BNCO], [MM_BNCO], [TI_MOVI_BANC], [NU_COMP_BANC]) REFERENCES [dbo].[TCMOVI_BANC] ([CO_EMPR], [CO_BANC], [CO_UNID_CONC], [NU_CNTA_BANC], [AA_BNCO], [MM_BNCO], [TI_MOVI_BANC], [NU_COMP_BANC])
GO
